#ifndef __TYPE__
#define __TYPE__

#include <ucontext.h>

#define E_SUCCESS  0 
#define E_FAILURE  1

enum status {READY = 0, RUNNING = 1, WAIT = 2, KILLED = 3};

struct list {
	struct cell * head;
	struct cell ** tail;
	int size;
};

struct thread_t {
	int 		 				 id;
	enum status 		 st;
	ucontext_t * context;
	void *        retval;
	struct thread_t * pere;
	int valgrind_stackid;
};
typedef struct thread_t * thread_t;

struct cell {
	thread_t thread;
	struct cell * next;
};

#endif
